package com.example.securitylianxi.config;


import com.example.securitylianxi.domain.AjaxResult;
import com.example.securitylianxi.domain.XingceUpload;
import com.example.securitylianxi.service.XingceUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/xingce")
public class XingCeController {

    @Autowired
    private XingceUploadService xingceUploadService;

    @GetMapping("/{id}")
    public AjaxResult getById(@PathVariable Integer id){
        XingceUpload student = xingceUploadService.getById(id);
        return AjaxResult.success(student);
    }
}
